package imper.main;

import imper.graphic.AppliState;
import imper.graphic.ButtonImage;
import imper.main.listener.ChangeViewListener;
import imper.main.listener.EndTurnListener;
import imper.main.view.EnumView;

import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Image;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.state.StateBasedGame;

public class BarMenuUtil
{
	public static void init(GameContainer gc, StateBasedGame pSbg, AppliState pView) throws SlickException
	{
		ButtonImage button5 = new ButtonImage(100, 10, new Image("data/pictuniv_7306.bmp"));
		button5.addListener(new ChangeViewListener(EnumView.MAPVIEW.getId(), pSbg));
		pView.addElement(button5);
		
		ButtonImage button6 = new ButtonImage(150, 10, new Image("data/pictuniv_7303.bmp"));
		button6.addListener(new ChangeViewListener(EnumView.TRANSPORTVIEW.getId(), pSbg));
		pView.addElement(button6);		
		

		ButtonImage button3 = new ButtonImage(200, 10, new Image("data/pictuniv_7302.bmp"));
		button3.addListener(new ChangeViewListener(EnumView.INDUSTRYVIEW.getId(), pSbg));
		pView.addElement(button3);
		
		ButtonImage button4 = new ButtonImage(250, 10, new Image("data/pictuniv_7301.bmp"));
		button4.addListener(new ChangeViewListener(EnumView.BOATUNITVIEW.getId(), pSbg));
		pView.addElement(button4);
		
		ButtonImage button2 = new ButtonImage(300, 10, new Image("data/pictuniv_7300.bmp"));
		button2.addListener(new ChangeViewListener(EnumView.CIVILUNITVIEW.getId(), pSbg));
		pView.addElement(button2);		
		
		ButtonImage button7 = new ButtonImage(750, 10, new Image("data/pictuniv_7307.bmp"));
		button7.addListener(new EndTurnListener());
		pView.addElement(button7);
	}
}
